Upgrade colab base image to 20260416-060047#1547
Conversation
rosbo
left a comment
There was a problem hiding this comment.
LGTM assuming the jenkins build completes successfully
The old floor (>=2023.0.1) allowed uv to resolve an older version that doesn't support NumPy 2.4 shipped in the new Colab base image. Raising the floor to >=2025.10.1 (which has explicit NumPy 2.4 fixes) ensures a compatible version is resolved during the main requirements install.
The version floor is now set in kaggle_requirements.txt (>=2025.10.1), so the separate post-install step is no longer needed.
scikit-learn-intelex may not be installable with newer NumPy versions (e.g. NumPy 2.4 from the updated Colab base image). Rather than fail the entire test suite, skip the test gracefully when the module is not present.
The base image's numba-cuda uses np.trapz which was removed in NumPy 2.4. The latest numba-cuda (v0.30.0) has a fix that conditionally registers np.trapz only for NumPy < 2.4, and uses np.trapezoid for NumPy >= 2.0. This fixes both test_numba.test_cuda_jit and test_tsfresh (via stumpy).
It failed, a lot. Might be good to get a new review before I commit. |
|
|
||
| import numpy as np | ||
|
|
||
| try: |
There was a problem hiding this comment.
Why do we need this? Shouldn't the package always be installed given it is in kaggle_requirements.txt?
There was a problem hiding this comment.
Looking at usage of this package in kernel, we only have a handful of users using it in any given day (<5). Most days it is a either no user or a single user.
See: https://plx.corp.google.com/scripts2/python-package-usage-over-time?p=PACKAGES%3A%22sklearnex%22
We should consider simply dropping this package if this is causing installation issues. these users can always pip install it themselves.
Per reviewer feedback, scikit-learn-intelex has <5 daily users and has been causing persistent installation issues with NumPy 2.4. Users who need it can pip install it themselves.
|
Addressed @rosbo's feedback: dropped |
## Problem After merging #1547 (Colab base image upgrade), the main branch CI is failing on the **Test CPU Image** stage (build #1924). The upgraded `numba-cuda` v0.30.0 now depends on `cuda-bindings` which requires `libcudart.so` at import time — this crashes on the CPU image where no CUDA runtime is installed. Two tests fail: - `test_numba` — `from numba import cuda` at module level triggers the crash - `test_tsfresh` — `tsfresh` → `stumpy` → `from numba import cuda` → same crash ``` cuda.pathfinder._dynamic_libs.load_dl_common.DynamicLibNotFoundError: Failure finding "libcudart.so": No such file: libcudart.so* ``` ## Fix ### Dockerfile.tmpl - Keep `numba` upgrade for both CPU and GPU images (needed for NumPy 2.4) - Move `numba-cuda` install into the GPU-only section (`{{ if eq .Accelerator "gpu" }}`) ### test_numba.py - Move `from numba import cuda` from module-level into the `@gpu_test` method (lazy import) ### test_tsfresh.py - Guard the `tsfresh` import with try/except and skip the test if it fails on CPU b/485275559
Upgrade both GPU (runtime) and CPU (cpu-runtime) Colab base images to the latest available release:
release-colab-external-images_20260416-060047_RC00release-colab-external-images_20260416-060047_RC00Previously using
release-colab-external_20260226-060109_RC00.Note: The tag naming convention has changed from
release-colab-external_*torelease-colab-external-images_*.b/493600019